<% add_decidim_page_title(t("participatory_processes", scope: "decidim.admin.titles")) %>
<%= admin_tabs(:admin_participatory_processes_menu).render %>

<div class="card" id="processes">
  <%= admin_filter_selector %>
</div>

<div class="table-stacked">
  <table class="table-list">
    <%= render partial: "processes_thead" %>
    <tbody>
    <%= render partial: "decidim/participatory_processes/admin/participatory_processes/process_row",
               collection: @participatory_processes,
               as: :process,
               locals: { view: :index } %>
    </tbody>
  </table>
</div>
<% if allowed_to? :read, :process, trashable_deleted_resource: @participatory_processes %>
  <div class="card mt-4">
    <%= link_to manage_trash_participatory_processes_path, class: "flex items-center  text-secondary" do %>
      <%= icon "delete-bin-2-line", class: "mr-2 fill-current text-secondary", role: "img" %>
      <%= t("actions.view_deleted_processes", scope: "decidim.admin") %>
      <span class="ml-2">
        <%= icon_with_tooltip("information-line", t("tooltips.deleted_processes_info", scope: "decidim.admin")) %>
      </span>
    <% end %>
  </div>
<% end %>

<%= decidim_paginate @participatory_processes %>
